<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="keywords" content="旧书,二手书,二手教材,旧教材,校园书籍,校园旧书，旧书网">
<meta name="description" content="买卖二手书，就上旧书街">
<meta name="language" content="zh">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="res/form.css">
<link rel="stylesheet" type="text/css" href="res/pager.css">
<link rel="stylesheet" type="text/css" href="res/ubm_basic.css">
<link rel="shortcut icon"
	href="http://cdnfile.jiushujie.com/images/ubm.ico" type="image/x-icon">
<title>买卖二手书,就上旧书街</title>
</head>
<body>
<div th:replace="index::div#header"></div>
	<div class="main_middle" id="app3">
		<div id="main_content" class="center_980">
			<div th:replace="user-01set::div.content_left"></div>
			<div class="content_right">
				<div class="border_white padding_10">
					<div class="form">
							<input type="hidden"
								value="aldwNTRsWTk3QTdqbnFsb0w3eUdkWE41NEZrNHdxfnBVszCUZnhj1OTN9RXoDkEBa_S8ZcvJbtfVa7Wuuai2Hw=="
								name="YII_CSRF_TOKEN">
							<table class="ubm_input">
								<tbody>
									<tr>
										<td><label for="User_password_old">原密码</label></td>
										<td><input maxlength="32" class="input_public"
											name="User[password_old]" id="User_password_old"
											type="password" v-model="ypwd" @blur="checkypwd" @focus="checkypwd"></td>
										<td><div id="User_password_oldTip" class="onFocus" v-model="ypwdTip"
												style="margin: 0px; padding: 0px;color: red; background: transparent;">
											{{ypwdTip}}</div></td>
									</tr>
									<tr>
										<td><label for="User_password">新密码</label></td>
										<td><input maxlength="32" class="input_public"  @focus="checkxpwd"
											name="User[password]" id="User_password" type="password"
											v-model="xpwd"></td>
										<td><div id="User_passwordTip" class="onShow" v-model="xpwdTip"
												style="margin: 0px; padding: 0px;color: red; background: transparent;">{{xpwdTip}}</div></td>
									</tr>
									<tr>
										<td><label for="User_password_repeat">重复密码</label></td>
										<td><input maxlength="32" class="input_public" @blur="checkcpwd" @focus="checkcpwd"
											name="User[password_repeat]" id="User_password_repeat"
											type="password" v-model="cpwd"></td>
										<td><div id="User_password_repeatTip" class="onShow"
												style="margin: 0px; padding: 0px;color: red; background: transparent;" v-model="cpwdTip">{{cpwdTip}}</div></td>
									</tr>
								</tbody>
							</table>
							<div class="margin_left_134">
								<input id="submit_button" class="button" name="yt0"
									type="button" value="提交修改" @click="changepwd">
							</div>


					</div>
				</div>
			</div>
			<div class="clearfloat"></div>
		</div>
	</div>
<script>
	var u3v = new Vue({
		el: "#app3",
		data:{
			ypwd:'',         //原密码
			xpwd:'',         //新密码
			cpwd:'',         //确认密码
			ypwdTip:'',
			xpwdTip:'',
			cpwdTip:''
		},
		methods:{

			checkypwd(){
				if (this.ypwd==''){
					this.ypwdTip="请输入原密码";
				}else {
					this.ypwdTip="";
				}
			},
			checkxpwd(){
				if (this.xpwd==''){
					this.xpwdTip="请输入新密码";
				}else if (this.xpwd!=this.cpwd){
					this.xpwdTip="两次密码不一致";
				}else {
					this.xpwdTip="";
					this.cpwdTip="";
				}

			},
			checkcpwd(){
				if (this.cpwd==''){
					this.cpwdTip="请再次输入新密码";
				}else if (this.xpwd!=this.cpwd){
					this.cpwdTip="两次密码不一致";
				}else {
					this.cpwdTip="";
					this.xpwdTip="";
				}

			},

			changepwd(){
				let hash = hex_md5(this.xpwd);
				let  params=new URLSearchParams();
				params.append("pwd",hash);
				axios.post("jsj-user/jiushujie/jsjUser/changepwd",params).then(res=>{
					if (res.data.msg==1){
						t.user.pwd=res.data.data;
					}
					this.ypwdTip="";
					this.cpwdTip="";
					this.xpwdTip="";
					this.ypwd="";
					this.xpwd="";
					this.cpwd="";
					alert(res.data.msg);
				})
			}
		}
	})
</script>
	<div style="border-bottom: 1px solid rgb(255, 255, 255);"></div>
	<div style="position: fixed; top: 122px; right: 20px;">
		<img style="width: 120px; margin-bottom: 10px;"
			src="res/ios_download.jpg"><br> <img
			style="width: 120px; margin-bottom: 10px;"
			src="res/android_download.jpg">
	</div>
	<div class="clearfloat"></div>
	<div class="bottom">
		<div class="center_980">
			<div class="bottom_left">
				<ul>
					<li><a href="http://www.jiushujie.com/site/about">关于我们</a></li>
					<li><a href="http://www.jiushujie.com/site/joinus">申请合作</a></li>
					<li><a href="http://www.jiushujie.com/site/privacy">隐私政策</a></li>
					<li><a href="http://www.jiushujie.com/site/term">服务条款</a></li>
					<li><a href="http://www.jiushujie.com/site/help">帮助</a></li>
					<li><a href="http://www.jiushujie.com/site/link">友情链接</a></li>
				</ul>
			</div>
			<div id="copyright">
				© 2020 by 旧书街 <a href="http://beian.miit.gov.cn/">蜀ICP备16007902号-2</a>
			</div>
		</div>
	</div>
	<h1 class="jiushujie_slogan">买卖二手书，就上旧书街。旧书街二手书交易网-您身边的旧书网站</h1>
</body>
</html>